﻿using System;

class CalculateNnumbers
{
    static void Main()
    {
        //Exercise 7.
        //Write a program that gets a number n and after that gets more n numbers and calculates and prints their sum.

        Console.Write("Type n: ");
        int n = int.Parse(Console.ReadLine());
        double result = 0;

        for (int i = 0; i < n; i++)
        {
            Console.Write("Enter a number: ");
            double newResult = double.Parse(Console.ReadLine());
            result = result + newResult;
        }
        Console.WriteLine();
        Console.WriteLine("The sum of the above numbers is:  {0:0.00}", result);
        Console.WriteLine();
    }
}

